/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-10-08
 * Time: 17:12
 */
class SingletonLazy1{
    private static SingletonLazy1 instance = null;

    public static SingletonLazy1 getInstance(){
        if(instance == null){
            instance = new SingletonLazy1();
        }
        return instance;
    }

    private SingletonLazy1(){

    }
}

public class demo4 {
    public static void main(String[] args) {
        SingletonLazy1 s1 = SingletonLazy1.getInstance();
        SingletonLazy1 s2 = SingletonLazy1.getInstance();
        System.out.println(s1 == s2);
    }
}
